package com.kfm.pm;

public class Break03 {

    public static void main(String[] args) {
        //  找100以内的素数    只能1和他本身整除的数字就是素数
        // i % 1 == 0
        int i = 6;
        int count = 0; // 统计能整除的数量
        for (int j = 1; j <= i; j ++) { // j = 1  count = 1 j = 2  count = 2 j = 3  count = 3  j = 4
            if (i % j == 0) {
                count ++;
            }
            if (count > 2) {
                break;
            }
        }
        if (count == 2) {
            System.out.println("是素数");
        }
    }
}
